import type {AxiosResponse} from "axios";

export type ErrorCodeItem = {
    label: string;
    desc: string;
    handler?: (item:ErrorCodeItem, response: AxiosResponse) => void;
}

export const ErrorCodes: Record<string, ErrorCodeItem> = {
    '900': {
        label: 'reLogin',
        desc: '需重新登录，重定向到登录界面',
        handler: () => {
            window.location.href = window.location.origin+'/#/login';
        }
    },
}